<g:if test="${img}">
    <g:if test="${img.href}">
        <g:link url="${img.href}" target="${img.target}"><img class="${img.css}" src="${img.src}" width="${img.width}" height="${img.height}" title="${img.title}" alt="${img.alt}" /></g:link>
    </g:if>
    <g:else>
        <img class="${img.css}" src="${img.src}" width="${img.width}" height="${img.height}" title="${img.title}" alt="${img.alt}" />
    </g:else>
</g:if>